package com.wang.serviceconsumer.controller;

import com.wang.serviceconsumer.service.ProviderClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerController {
    @Autowired
    private ProviderClientService providerClientService;

    @GetMapping("/test")
    public String test(@RequestParam("name") String name){
        return providerClientService.test(name);
    }
}
